
	
	<header class="navbar navbar-fixed-top">
    <div class="container">
        <!-- 手机访问时的按钮菜单 -->
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"> </span>
            <span class="icon-bar"> </span>
            <span class="icon-bar"> </span>
          </button>
          <a class="navbar-brand" href="<?php echo site_url();?>">首页</a>
        </div>
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="navbar-collapse-1">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="<?php echo site_url('/user/register_form/');?>">注册</a></li>
            <?php if(!isset($this->session->userdata['email'])): ?>
            <li><a href="<?php echo site_url('/user/login_form/'); ?>">登录</a></li>
          	<?php else: ?>
          	<li><a href="<?php echo site_url('/user/logout/'); ?>"><?php echo $this->session->userdata['email']; ?></a></li>
          	<?php endif; ?>
          </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container -->
  </header>

